home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume23 / transfig / part01 next >
Encoding:
Internet Message Format  |  1991-06-19  |  61.0 KB

  1. Path: j.cc.purdue.edu!mentor.cc.purdue.edu!noose.ecn.purdue.edu!samsung!usc!apple!bbn.com!papaya.bbn.com!rsalz
  2. From: rsalz@bbn.com (Rich Salz)
  3. Newsgroups: comp.sources.unix
  4. Subject: v23i014:  Tools for creating TeX documents with portable graphics, Part01/06
  5. Message-ID: <2811@litchi.bbn.com>
  6. Date: 31 Aug 90 13:43:06 GMT
  7. Organization: BBN Systems and Technologies, Cambridge MA
  8. Lines: 2075
  9. Approved: rsalz@uunet.UU.NET
  10. X-Checksum-Snefru: 639ca2be 5786fa36 6e706f0c 04c648f2
  11.  
  12. Submitted-by: Micah Beck <beck@cs.cornell.edu>
  13. Posting-number: Volume 23, Issue 14
  14. Archive-name: transfig/part01
  15.  
  16. TransFig is a set of tools for creating TeX documents with graphics
  17. which are portable, in the sense that they can be printed in a wide
  18. variety of environments.
  19.  
  20. The transfig directory contains the source for the transfig command
  21. which generates a Makefile which translates Fig code to various graphics
  22. description languages using the fig2dev program.  In previous releases,
  23. this command was implemented as a shell script.
  24.  
  25. Drivers currently exist for the following graphics langauges:
  26. (E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, and PostScript.
  27. Fig2dev can be configured with a subset of these drivers
  28.  
  29. XMicah Beck                beck@cs.cornell.edu
  30. XDept of Computer Science
  31. XCornell University
  32.  
  33. #! /bin/sh
  34. # This is a shell archive.  Remove anything before this line, then unpack
  35. # it by saving it into a file and typing "sh file".  To overwrite existing
  36. # files, type "sh file -c".  You can also feed this as standard input via
  37. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  38. # will see the following message at the end:
  39. #        "End of archive 1 (of 6)."
  40. # Contents:  transfig transfig/Makefile transfig/README
  41. #   transfig/VERSION transfig/doc transfig/doc/manual
  42. #   transfig/doc/manual/Makefile transfig/doc/manual/README
  43. #   transfig/doc/manual/setup12.tex transfig/doc/manual/threepart.sty
  44. #   transfig/doc/manual/trans.fig.uu transfig/doc/manual/trans.tex
  45. #   transfig/doc/manual/transfig.tex transfig/doc/transfig.1
  46. #   transfig/fig2dev transfig/fig2dev/Makefile transfig/fig2dev/NOTES
  47. #   transfig/fig2dev/alloc.h transfig/fig2dev/arrow.c
  48. #   transfig/fig2dev/dev transfig/fig2dev/dev/Makefile
  49. #   transfig/fig2dev/dev/genbox.c transfig/fig2dev/dev/picfonts.h
  50. #   transfig/fig2dev/dev/texfonts.h transfig/fig2dev/drivers.h
  51. #   transfig/fig2dev/fig2dev.h transfig/fig2dev/fig2ps2tex
  52. #   transfig/fig2dev/free.c transfig/fig2dev/getopt.c
  53. #   transfig/fig2dev/newfont.h transfig/fig2dev/pi.h
  54. #   transfig/fig2dev/pic2tpic transfig/patchlevel.h transfig/transfig
  55. #   transfig/transfig/Makefile transfig/transfig/mkfile.c
  56. #   transfig/transfig/sys.c transfig/transfig/transfig.c
  57. #   transfig/transfig/transfig.h transfig/transfig/txfile.c
  58. # Wrapped by beck@rocky on Thu May 17 15:56:10 1990
  59. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  60. if test ! -d 'transfig' ; then
  61.     echo shar: Creating directory \"'transfig'\"
  62.     mkdir 'transfig'
  63. fi
  64. if test -f 'transfig/Makefile' -a "${1}" != "-c" ; then 
  65.   echo shar: Will not clobber existing file \"'transfig/Makefile'\"
  66. else
  67. echo shar: Extracting \"'transfig/Makefile'\" \(763 characters\)
  68. sed "s/^X//" >'transfig/Makefile' <<'END_OF_FILE'
  69. X#
  70. X# Top level Makefile for TransFig
  71. X#
  72. X# to make fig2dev:         type "make"
  73. X#
  74. X# to install:              set  BINDIR in Makefile
  75. X#               type "make install"
  76. X#
  77. X# to make manual:          type "make manual"
  78. X
  79. X# directory in which to install executables
  80. XBINDIR = /usr/local/bin
  81. XMANDIR = /usr/local/man/man1
  82. X
  83. Xall:
  84. X    cd transfig; make
  85. X    cd fig2dev; make
  86. X
  87. Xmanual: 
  88. X    cd doc/manual; make; latex manual; latex manual
  89. X
  90. Xinstall:    all
  91. X    install -c -s transfig/transfig$(TARGET_ARCH) $(BINDIR)/transfig
  92. X    install -c -s fig2dev/fig2dev$(TARGET_ARCH) $(BINDIR)/fig2dev
  93. X    install -c fig2dev/fig2ps2tex $(BINDIR)
  94. X    install -c fig2dev/pic2tpic $(BINDIR)
  95. X    install -c doc/transfig.1 doc/fig2dev.1 $(MANDIR)
  96. X
  97. Xclean:
  98. X    cd transfig; make clean
  99. X    cd fig2dev; make clean
  100. X    cd doc/manual; make clean
  101. END_OF_FILE
  102. if test 763 -ne `wc -c <'transfig/Makefile'`; then
  103.     echo shar: \"'transfig/Makefile'\" unpacked with wrong size!
  104. fi
  105. # end of 'transfig/Makefile'
  106. fi
  107. if test -f 'transfig/README' -a "${1}" != "-c" ; then 
  108.   echo shar: Will not clobber existing file \"'transfig/README'\"
  109. else
  110. echo shar: Extracting \"'transfig/README'\" \(1513 characters\)
  111. sed "s/^X//" >'transfig/README' <<'END_OF_FILE'
  112. XTransFig is a set of tools for creating TeX documents with graphics
  113. Xwhich are portable, in the sense that they can be printed in a wide
  114. Xvariety of environments.
  115. X
  116. XThe transfig directory contains the source for the transfig command
  117. Xwhich generates a Makefile which translates Fig code to various graphics
  118. Xdescription languages using the fig2dev program.  In previous releases,
  119. Xthis command was implemented as a shell script.
  120. X
  121. XThe fig2dev directory contains a general program for translating from
  122. XFig code to other graphics desciption languages.  The dev subdirectory
  123. Xcontains a library of output drivers used by fig2dev.
  124. X
  125. XDrivers currently exist for the following graphics langauges:
  126. X(E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, and PostScript.
  127. XFig2dev can be configured with a subset of these drivers
  128. X
  129. XThe doc directory contains man pages for fig2dev and for the transfig command.
  130. XThe subdirectory doc/manual contains a manual for using TransFig to create
  131. Xdocuments with portable graphics.  The manual also contains a reference
  132. Xguide describing Fig code in detail, and a description of TFX, an extension to
  133. XFig code which is supported by the translators in this package.
  134. X
  135. XMicah Beck                beck@cs.cornell.edu
  136. XDept of Computer Science
  137. XCornell University
  138. X
  139. X1 January 1990
  140. X--------------
  141. X
  142. XVersion 2.0 note: The PostScript translation implemented by fig2dev
  143. Xnow supports both the TFX version of Fig code and the V2.0, the dialect
  144. Xused by XFig Version 2.0.  The other translations support only TFX.
  145. X
  146. X1 May 1990
  147. X
  148. END_OF_FILE
  149. if test 1513 -ne `wc -c <'transfig/README'`; then
  150.     echo shar: \"'transfig/README'\" unpacked with wrong size!
  151. fi
  152. # end of 'transfig/README'
  153. fi
  154. if test -f 'transfig/VERSION' -a "${1}" != "-c" ; then 
  155.   echo shar: Will not clobber existing file \"'transfig/VERSION'\"
  156. else
  157. echo shar: Extracting \"'transfig/VERSION'\" \(31 characters\)
  158. sed "s/^X//" >'transfig/VERSION' <<'END_OF_FILE'
  159. XTransFig Version 2.0 Release 1
  160. END_OF_FILE
  161. if test 31 -ne `wc -c <'transfig/VERSION'`; then
  162.     echo shar: \"'transfig/VERSION'\" unpacked with wrong size!
  163. fi
  164. # end of 'transfig/VERSION'
  165. fi
  166. if test ! -d 'transfig/doc' ; then
  167.     echo shar: Creating directory \"'transfig/doc'\"
  168.     mkdir 'transfig/doc'
  169. fi
  170. if test ! -d 'transfig/doc/manual' ; then
  171.     echo shar: Creating directory \"'transfig/doc/manual'\"
  172.     mkdir 'transfig/doc/manual'
  173. fi
  174. if test -f 'transfig/doc/manual/Makefile' -a "${1}" != "-c" ; then 
  175.   echo shar: Will not clobber existing file \"'transfig/doc/manual/Makefile'\"
  176. else
  177. echo shar: Extracting \"'transfig/doc/manual/Makefile'\" \(219 characters\)
  178. sed "s/^X//" >'transfig/doc/manual/Makefile' <<'END_OF_FILE'
  179. X# 
  180. X# Makefile: TransFig makefile for translation of figures into latex
  181. X# 
  182. Xall: tex-list
  183. Xtrans.tex: trans.fig
  184. X    fig2dev -Llatex  trans.fig trans.tex
  185. Xtex-list: trans.tex
  186. Xtrans.tex: Makefile
  187. Xclean:
  188. X    rm -f trans.tex
  189. END_OF_FILE
  190. if test 219 -ne `wc -c <'transfig/doc/manual/Makefile'`; then
  191.     echo shar: \"'transfig/doc/manual/Makefile'\" unpacked with wrong size!
  192. fi
  193. # end of 'transfig/doc/manual/Makefile'
  194. fi
  195. if test -f 'transfig/doc/manual/README' -a "${1}" != "-c" ; then 
  196.   echo shar: Will not clobber existing file \"'transfig/doc/manual/README'\"
  197. else
  198. echo shar: Extracting \"'transfig/doc/manual/README'\" \(434 characters\)
  199. sed "s/^X//" >'transfig/doc/manual/README' <<'END_OF_FILE'
  200. XThis directory contains a manual which describes TransFig and how to use it.
  201. XThe manual includes TransFig figures, which have been translated into
  202. XLaTeX picture environment commands.  To generate the manual, just run
  203. X"latex manual".
  204. X
  205. XFor purposes of mailing, the Fig code file trans.fig may have been 
  206. Xommited from this directory.  In its place is the uuencoded version
  207. Xtrans.fig.uu.  To unpack it, just run "uudecode <trans.fig.uu".
  208. END_OF_FILE
  209. if test 434 -ne `wc -c <'transfig/doc/manual/README'`; then
  210.     echo shar: \"'transfig/doc/manual/README'\" unpacked with wrong size!
  211. fi
  212. # end of 'transfig/doc/manual/README'
  213. fi
  214. if test -f 'transfig/doc/manual/setup12.tex' -a "${1}" != "-c" ; then 
  215.   echo shar: Will not clobber existing file \"'transfig/doc/manual/setup12.tex'\"
  216. else
  217. echo shar: Extracting \"'transfig/doc/manual/setup12.tex'\" \(1385 characters\)
  218. sed "s/^X//" >'transfig/doc/manual/setup12.tex' <<'END_OF_FILE'
  219. X% Set up LaTeX for an article.
  220. X% This should work for LaTeX 2.08.
  221. X% This file contains everything up to
  222. X% the \begin{document} command,
  223. X% and should be read in with an \input command.
  224. X\documentstyle[12pt,threepart]{article}
  225. X
  226. X% Formatting niceties.
  227. X
  228. X% ensure that all pages are the same length
  229. X\flushbottom{}
  230. X
  231. X% bump up the widow and club penalties
  232. X\makeatletter
  233. X\clubpenalty=\@highpenalty
  234. X\widowpenalty=\@highpenalty
  235. X\makeatother
  236. X
  237. X% save the value of \baselinestretch (this is the global default)
  238. X\let\BLS=\baselinestretch
  239. X% These allow switching interline spacing.  The size changes ensure that the
  240. X% change takes effect immediately.
  241. X\makeatletter
  242. X\newcommand{\singlespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1}\tiny\CS}
  243. X\newcommand{\doublespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.75}\tiny\CS}
  244. X\newcommand{\normalspacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{\BLS}\tiny\CS}
  245. X\makeatother
  246. X
  247. X% undo LaTeX's decision to make citation labels be \hbox'd.
  248. X\makeatletter
  249. X\def\@cite#1#2{[#1\if@tempswa , #2\fi]}
  250. X\makeatother
  251. X
  252. X
  253. X\setlength{\unitlength}{1mm}
  254. X
  255. X% Number footnotes with symbols.
  256. X\fnsymbol{footnote}
  257. X
  258. X\newtheorem{theorem}{Theorem}
  259. X\newtheorem{lemma}{Lemma}
  260. X\newtheorem{corollary}{Corollary}
  261. X\newtheorem{definition}{Definition}
  262. X
  263. X% Definition of the proof-environment:
  264. X\newenvironment{proof}{{\bf Proof:}\quad}{\hfill$\Box$\newline}
  265. X
  266. END_OF_FILE
  267. if test 1385 -ne `wc -c <'transfig/doc/manual/setup12.tex'`; then
  268.     echo shar: \"'transfig/doc/manual/setup12.tex'\" unpacked with wrong size!
  269. fi
  270. # end of 'transfig/doc/manual/setup12.tex'
  271. fi
  272. if test -f 'transfig/doc/manual/threepart.sty' -a "${1}" != "-c" ; then 
  273.   echo shar: Will not clobber existing file \"'transfig/doc/manual/threepart.sty'\"
  274. else
  275. echo shar: Extracting \"'transfig/doc/manual/threepart.sty'\" \(1428 characters\)
  276. sed "s/^X//" >'transfig/doc/manual/threepart.sty' <<'END_OF_FILE'
  277. X% Three part head and foot macros. 1/87
  278. X% Lance Berc
  279. X% Olsen & Associates    mcvax!unizh!olsen!lance@seismo.css.gov
  280. X% Seefeldstrasse 233
  281. X% CH-8008 Zurich
  282. X
  283. X% How users can set the head and foot text.
  284. X\def\lhead#1{\gdef\@lhead{#1}} \def\lfoot#1{\gdef\@lfoot{#1}}
  285. X\def\chead#1{\gdef\@chead{#1}} \def\cfoot#1{\gdef\@cfoot{#1}}
  286. X\def\rhead#1{\gdef\@rhead{#1}} \def\rfoot#1{\gdef\@rfoot{#1}}
  287. X
  288. X% Initialization of the head and foot text.
  289. X% By default the page number is at the center of the foot and everything
  290. X% else is empty.
  291. X\def\@lhead{} \def\@lfoot{}
  292. X\def\@chead{} \def\@cfoot{{\rm \thepage}}
  293. X\def\@rhead{} \def\@rfoot{}
  294. X
  295. X% Put together a three part header or footer given the left, center and
  296. X% right text. The \lap commands put the text into an hbox of zero size,
  297. X% so overlapping text is not detected (it just overlaps).
  298. X\def\@threepart#1#2#3{\rlap{#1} \hfil {#2} \hfil \llap{#3}}
  299. X
  300. X% Swap the notices on odd and even pages when twosided.
  301. X\def\ps@threepartheadings
  302. X    {
  303. X    \def\@oddhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  304. X    \def\@oddfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  305. X
  306. X    \if@twoside
  307. X    \def\@evenhead{\@threepart{\@rhead}{\@chead}{\@lhead}}
  308. X    \def\@evenfoot{\@threepart{\@rfoot}{\@cfoot}{\@lfoot}}
  309. X    \else
  310. X    \def\@evenhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  311. X    \def\@evenfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  312. X    \fi
  313. X    }
  314. X
  315. X% Default page style
  316. X\ps@threepartheadings
  317. X
  318. X% Default footers
  319. X\cfoot{\thepage}
  320. END_OF_FILE
  321. if test 1428 -ne `wc -c <'transfig/doc/manual/threepart.sty'`; then
  322.     echo shar: \"'transfig/doc/manual/threepart.sty'\" unpacked with wrong size!
  323. fi
  324. # end of 'transfig/doc/manual/threepart.sty'
  325. fi
  326. if test -f 'transfig/doc/manual/trans.fig.uu' -a "${1}" != "-c" ; then 
  327.   echo shar: Will not clobber existing file \"'transfig/doc/manual/trans.fig.uu'\"
  328. else
  329. echo shar: Extracting \"'transfig/doc/manual/trans.fig.uu'\" \(3346 characters\)
  330. sed "s/^X//" >'transfig/doc/manual/trans.fig.uu' <<'END_OF_FILE'
  331. Xbegin 644 trans.fig
  332. XM(T9)1R Q+C0M5$98"C@P(#(*,B Q(# @,2 P(# @," P(# N,# P(#$@, H)
  333. XM," P(#$N,# P(#0N,# P(#@N,# P"@D@-#,Y(#$Y-" S,SD@,C$Y(#DY.3D@
  334. XM.3DY.0HR(#$@," Q(# @," P(# @,"XP,# @,2 P"@DP(# @,2XP,# @-"XP
  335. XM,# @."XP,# *"2 Q-3D@,3DT(#(U.2 R,3D@.3DY.2 Y.3DY"C(@,B Q(#$@
  336. XM," P(# @," T+C P," P(# *"2 T-CD@,3<P(#0V.2 Q.#D@-# Y(#$X.2 T
  337. XM,#D@,3<P(#0V.2 Q-S @.3DY.2 Y.3DY"C(@,2 P(#$@," P(# @," P+C P
  338. XM," Q(# *"3 @," Q+C P," T+C P," X+C P, H)(#,Q-2 R.#(@,S@U(#,Q
  339. XM-R Y.3DY(#DY.3D*,B Q(# @,2 P(# @," P(# N,# P(#$@, H)," P(#$N
  340. XM,# P(#0N,# P(#@N,# P"@D@,CDY(#(S.2 R.3D@,C4T(#DY.3D@.3DY.0HR
  341. XM(#$@," Q(# @," P(# @-"XP,# @,2 P"@DP(# @,2XP,# @-"XP,# @."XP
  342. XM,# *"2 R-3<@,C@P(#$T," S,3D@.3DY.2 Y.3DY"C(@,2 P(#$@," P(# @
  343. XM," T+C P," Q(# *"3 @," Q+C P," T+C P," X+C P, H)(#(X,R R.#(@
  344. XM,C$S(#,Q-R Y.3DY(#DY.3D*,B Q(# @,2 P(# @," P(#0N,# P(#$@, H)
  345. XM," P(#$N,# P(#0N,# P(#@N,# P"@D@,CDY(#(X,B R.3D@,S$W(#DY.3D@
  346. XM.3DY.0HR(#(@," Q(# @-3$Y(# @," P+C P," P(# *"2 R-CD@,C4Y(#(V
  347. XM.2 R-SD@,S(Y(#(W.2 S,CD@,C4Y(#(V.2 R-3D@.3DY.2 Y.3DY"C(@,2 P
  348. XM(#$@," P(# @," T+C P," Q(# *"3 @," Q+C P," T+C P," X+C P, H)
  349. XM(#,S.2 R-SD@-#4Y(#,Q.2 Y.3DY(#DY.3D*,B Q(# @,2 P(# @," P(# N
  350. XM,# P(#$@, H)," P(#$N,# P(#0N,# P(#@N,# P"@D@,CDY(#$Y-" R.3D@
  351. XM,C$Y(#DY.3D@.3DY.0HR(#$@," Q(# @," P(# @,"XP,# @," Q"@DP(# @
  352. XM,2XP,# @-"XP,# @."XP,# *"2 S,3D@,C$Y(#,V.2 Q.30@.3DY.2 Y.3DY
  353. XM"C(@,2 P(#$@," P(# @," P+C P," Q(# *"3 @," Q+C P," T+C P," X
  354. XM+C P, H)(#(R.2 Q.30@,C<Y(#(Q.2 Y.3DY(#DY.3D*,B Q(# @,2 P(# @
  355. XM," P(#0N,# P(#$@, H)," P(#$N,# P(#0N,# P(#@N,# P"@D@-#4Y(#,T
  356. XM," T-3D@,S4U(#DY.3D@.3DY.0HR(#(@,2 Q(# @," P(# @-"XP,# @," P
  357. XM"@D@-#@Y(#,U.2 T.#D@,S<Y(#0R.2 S-SD@-#(Y(#,U.2 T.#D@,S4Y(#DY
  358. XM.3D@.3DY.0HR(#$@," Q(# @," P(# @-"XP,# @,2 P"@DP(# @,2XP,# @
  359. XM-"XP,# @."XP,# *"2 T-3D@,S@T(#0U.2 S.3D@.3DY.2 Y.3DY"C(@,B Q
  360. XM(#$@," P(# @," T+C P," P(# *"2 Q.#D@,3<P(#$X.2 Q.#D@,3(Y(#$X
  361. XM.2 Q,CD@,3<P(#$X.2 Q-S @.3DY.2 Y.3DY"C(@,B Q(#$@," U,3D@," P
  362. XM(#0N,# P(# @, H)(#(U.2 Q-CD@,C4Y(#$X.2 Q.3D@,3@Y(#$Y.2 Q-CD@
  363. XM,C4Y(#$V.2 Y.3DY(#DY.3D*,B R(#$@,2 P(# @," P(#0N,# P(# @, H)
  364. XM(#,R.2 Q-S @,S(Y(#$X.2 R-CD@,3@Y(#(V.2 Q-S @,S(Y(#$W," Y.3DY
  365. XM(#DY.3D*,B R(#$@,2 P(# @," P(#0N,# P(# @, H)(#,Y.2 Q-S @,SDY
  366. XM(#$X.2 S,SD@,3@Y(#,S.2 Q-S @,SDY(#$W," Y.3DY(#DY.3D*-" Q(# @
  367. XM," P(# @," P+C P," P(#$V(#8T(#0S.2 Q.#(@>&%P9W)A<&@!"C0@,2 P
  368. XM(# @," P(# @,"XP,# @," Q-B U-B R,CD@,3@R(&=N=7!L;W0!"C0@,2 P
  369. XM(# @," P(# @,"XP,# @," Q-B V-" S-CD@,3@R('!L;W0R9FEG 0HT(#$@
  370. XM," P(# @," P(# N,# P(#$@,38@-38@,CDY(#(W,R!F:6<R9&5V 0HT(#$@
  371. XM,2 P(# @," P(# N,# P(#$@,38@-C0@,S<Y(#,T.2!C;VUM86YD<P$*-" Q
  372. XM(#$@," P(# @," P+C P," Q(#$V(#4V(#,W.2 S,S,@*$4I15!)0P$*-" Q
  373. XM(#$@," P(# @," P+C P," P(#$V(#0X(#(Q.2 S-#@@4V-R:7!T 0HT(#$@
  374. XM,2 P(# @," P(# N,# P(# @,38@,S(@,C$Y(#,S,B!0;W-T 0HT(#$@,2 P
  375. XM(# @," P(# N,# P(# @,38@-#@@,3,V(#,S,R!0:4-495@!"C0@,2 Q(# @
  376. XM," P(# @,"XP,# @," Q-B T." Q,S<@,S0X(&UA8W)O<P$*-" Q(#$@," P
  377. XM(# @," P+C P," Q(#$V(#0P(#(Y.2 S,S,@3&%495@!"C0@,2 Q(# @," P
  378. XM(# @,"XP,# @,2 Q-B V-" R.3D@,S0Y(&-O;6UA;F1S 0HT(#$@,2 P(# @
  379. XM," P(# N,# P(# @,38@-C0@,S Q(#(S,R!&:6<@8V]D90$*-" Q(#$@," P
  380. XM(# @," P+C P," Q(#$V(#,R(#0U.2 T,3,@='!I8P$*-" Q(#$@," P(# @
  381. XM," P+C P," Q(#$V(#8T(#0U.2 T,S @<W!E8VEA;',!"C0@,2 Q(# @," P
  382. XM(# @,"XP,# @,2 Q-B R-" T-3D@,S,S(%!)0P$*-" Q(# @," P(# @," P
  383. XM+C P," Q(#$V(#,R(#0U.2 S-S(@='!I8P$*-" Q(# @," P(# @," P+C P
  384. XM," P(#$V(#(T(#$U.2 Q.#(@9FEG 0HT(#$@," P(# @," P(# N,# P(# @
  385. X7,38@-38@,CDY(#$X,B!P:6,R9FEG 0HT
  386. Xend
  387. END_OF_FILE
  388. if test 3346 -ne `wc -c <'transfig/doc/manual/trans.fig.uu'`; then
  389.     echo shar: \"'transfig/doc/manual/trans.fig.uu'\" unpacked with wrong size!
  390. fi
  391. # end of 'transfig/doc/manual/trans.fig.uu'
  392. fi
  393. if test -f 'transfig/doc/manual/trans.tex' -a "${1}" != "-c" ; then 
  394.   echo shar: Will not clobber existing file \"'transfig/doc/manual/trans.tex'\"
  395. else
  396. echo shar: Extracting \"'transfig/doc/manual/trans.tex'\" \(2190 characters\)
  397. sed "s/^X//" >'transfig/doc/manual/trans.tex' <<'END_OF_FILE'
  398. X\setlength{\unitlength}{0.0125in}%
  399. X\begin{picture}(379,264)(113,409)
  400. X\thicklines
  401. X\put(270,560){\framebox(60,20){}}
  402. X\put(200,650){\dashbox{4}(60,20){}}
  403. X\put(258,559){\vector(-3,-1){117}}
  404. X\put(410,650){\dashbox{4}(60,19){}}
  405. X\put(316,557){\vector( 2,-1){ 70}}
  406. X\put(300,600){\vector( 0,-1){ 15}}
  407. X\put(284,557){\vector(-2,-1){ 70}}
  408. X\put(300,557){\vector( 0,-1){ 35}}
  409. X\put(160,645){\vector( 4,-1){100}}
  410. X\put(440,645){\vector(-4,-1){100}}
  411. X\put(300,645){\vector( 0,-1){ 25}}
  412. X\put(370,645){\vector(-2,-1){ 50}}
  413. X\put(230,645){\vector( 2,-1){ 50}}
  414. X\put(460,499){\vector( 0,-1){ 15}}
  415. X\put(430,460){\dashbox{4}(60,20){}}
  416. X\put(460,455){\vector( 0,-1){ 15}}
  417. X\put(130,650){\dashbox{4}(60,19){}}
  418. X\put(340,560){\vector( 3,-1){120}}
  419. X\put(270,650){\dashbox{4}(60,19){}}
  420. X\put(340,650){\dashbox{4}(60,19){}}
  421. X\put(440,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm xapgraph}}}
  422. X\put(230,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm gnuplot}}}
  423. X\put(370,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm plot2fig}}}
  424. X\put(300,566){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm fig2dev}}}
  425. X\put(380,490){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm commands}}}
  426. X\put(380,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm (E)EPIC}}}
  427. X\put(220,491){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm Script}}}
  428. X\put(220,507){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm Post}}}
  429. X\put(137,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm PiCTeX}}}
  430. X\put(138,491){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm macros}}}
  431. X\put(300,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm LaTeX}}}
  432. X\put(300,490){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm commands}}}
  433. X\put(302,606){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm Fig code}}}
  434. X\put(460,426){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm tpic}}}
  435. X\put(460,409){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm specials}}}
  436. X\put(460,506){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm PIC}}}
  437. X\put(460,467){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm tpic}}}
  438. X\put(160,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm fig}}}
  439. X\put(300,657){\makebox(0,0)[b]{\raisebox{0pt}[0pt][0pt]{\elvrm pic2fig}}}
  440. X\end{picture}
  441. END_OF_FILE
  442. if test 2190 -ne `wc -c <'transfig/doc/manual/trans.tex'`; then
  443.     echo shar: \"'transfig/doc/manual/trans.tex'\" unpacked with wrong size!
  444. fi
  445. # end of 'transfig/doc/manual/trans.tex'
  446. fi
  447. if test -f 'transfig/doc/manual/transfig.tex' -a "${1}" != "-c" ; then 
  448.   echo shar: Will not clobber existing file \"'transfig/doc/manual/transfig.tex'\"
  449. else
  450. echo shar: Extracting \"'transfig/doc/manual/transfig.tex'\" \(38 characters\)
  451. sed "s/^X//" >'transfig/doc/manual/transfig.tex' <<'END_OF_FILE'
  452. X\typeout{TransFig: figures in LaTeX.}
  453. END_OF_FILE
  454. if test 38 -ne `wc -c <'transfig/doc/manual/transfig.tex'`; then
  455.     echo shar: \"'transfig/doc/manual/transfig.tex'\" unpacked with wrong size!
  456. fi
  457. # end of 'transfig/doc/manual/transfig.tex'
  458. fi
  459. if test -f 'transfig/doc/transfig.1' -a "${1}" != "-c" ; then 
  460.   echo shar: Will not clobber existing file \"'transfig/doc/transfig.1'\"
  461. else
  462. echo shar: Extracting \"'transfig/doc/transfig.1'\" \(1886 characters\)
  463. sed "s/^X//" >'transfig/doc/transfig.1' <<'END_OF_FILE'
  464. X.TH TRANSFIG 1 "29 March 1989"
  465. X.SH NAME
  466. Xtransfig \- creates a makefile for portable LaTeX figures
  467. X.SH SYNOPSIS
  468. X.B transfig
  469. X[ -L \fIlanguage\fR ]
  470. X[ -M \fImakefile\fR ]
  471. X[ -T \fItexfile\fR ]
  472. X[ \fIcontrol_specs\fR figfile ... ] ...]
  473. X.SH DESCRIPTION
  474. X.I Transfig
  475. Xcreates a makefile to translate figures described in Fig code, PostScript,
  476. Xor PIC into a specified LaTeX graphics \fIlanguage\fR.
  477. XPostScript and PIC files are identified by the suffixes ".ps" and ".pic"
  478. Xrespectively;
  479. XFig files can be specified either with or without the suffix ".fig" .
  480. XTransfig also creates a TeX macro file appropriate to the target language.
  481. X.SH OPTIONS
  482. XThe \fIlanguage\fR specifier must be either
  483. X.T
  484. X.BR epic ,
  485. X.BR eepic ,
  486. X.BR eepicemu ,
  487. X.BR latex ,
  488. X.BR pictex ,
  489. X.BR ps ,
  490. X.BR psfig ,
  491. X.BR tpic ,
  492. Xor
  493. X.BR null .
  494. XThe specifier
  495. X.B psfig
  496. Xis like the 
  497. X.B ps
  498. Xspecifier, except that it
  499. Xmake use of the psfig macro package.
  500. XThe specifier 
  501. X.B null
  502. Xresults in the figures being replaced by empty boxes of the
  503. Xappropriate size.
  504. XIf no language is specified,
  505. X.B epic
  506. Xis the default.
  507. X.PP
  508. XThe names of the makefile and TeX macro file can be set with the
  509. X-M and -T options.
  510. XThe default names are "Makefile" and "transfig.tex", respectively.
  511. X.PP
  512. XControl specifiers are 
  513. X.TP
  514. X\fB\-m\fI mag\fR
  515. Xset the magnification at which the figure is rendered (default 1.0).
  516. X.TP
  517. X\fB\-f\fI font\fR
  518. Xset the default font family used for text objects (default "\fBcmr\fR").
  519. X.TP
  520. X\fB\-s \fIfontsize\fR
  521. Xset the default font size (in points) for text objects (default 11*\fImag\fR).
  522. X.PP
  523. XIf there is no scaling, the default font is "\fB\\elvrm\fR".
  524. XLanguage and control specifiers may occur more than once;
  525. Xthey affect the translation of files which appear to their
  526. Xright in the argument list. 
  527. XIf no files are specified, then "*.fig" is assumed.
  528. X.SH "SEE ALSO"
  529. Xfig(1),
  530. Xfig2dev(1),
  531. Xpic(1),
  532. Xpic2fig(1),
  533. X.SH AUTHOR
  534. XMicah Beck (beck@svax.cs.cornell.edu)
  535. END_OF_FILE
  536. if test 1886 -ne `wc -c <'transfig/doc/transfig.1'`; then
  537.     echo shar: \"'transfig/doc/transfig.1'\" unpacked with wrong size!
  538. fi
  539. # end of 'transfig/doc/transfig.1'
  540. fi
  541. if test ! -d 'transfig/fig2dev' ; then
  542.     echo shar: Creating directory \"'transfig/fig2dev'\"
  543.     mkdir 'transfig/fig2dev'
  544. fi
  545. if test -f 'transfig/fig2dev/Makefile' -a "${1}" != "-c" ; then 
  546.   echo shar: Will not clobber existing file \"'transfig/fig2dev/Makefile'\"
  547. else
  548. echo shar: Extracting \"'transfig/fig2dev/Makefile'\" \(784 characters\)
  549. sed "s/^X//" >'transfig/fig2dev/Makefile' <<'END_OF_FILE'
  550. X#    Fig2dev : General Fig code translation program
  551. X#
  552. X#    Micah Beck
  553. X#    Modified from f2ps
  554. X#
  555. X
  556. X#
  557. X# to include drivers for the following langauges, 
  558. X# add the corresponding symbol to the DRIVERS list
  559. X#
  560. X# DRIVERS = -DEPIC -DLATEX -DPIC  -DPICTEX -DPS
  561. X#
  562. XDRIVERS = -DEPIC -DLATEX -DPIC  -DPICTEX -DPS
  563. X
  564. XFIGOBJ = arrow.o bound.o free.o read.o read1_3.o latex_line.o
  565. XOBJ = fig2dev.o getopt.o $(FIGOBJ)
  566. X
  567. XLIB = lib$(TARGET_ARCH).a
  568. XLIBS = dev/$(LIB)
  569. X
  570. X#CFLAGS =  -g $(DRIVERS)
  571. XCFLAGS = -O $(DRIVERS)
  572. X
  573. XTARGET = fig2dev$(TARGET_ARCH)
  574. X
  575. X$(TARGET): $(OBJ) $(LIBS) 
  576. X    $(CC) $(TARGET_ARCH) $(OBJ) $(LIBS) -lm -o $(TARGET)
  577. X
  578. X$(LIBS): always
  579. X    (cd dev; make)
  580. X
  581. X$(OBJ): fig2dev.h drivers.h
  582. X
  583. X
  584. X#########
  585. Xalways:
  586. X
  587. Xtidy: 
  588. X    rm -f *.o
  589. X    (cd dev; make tidy)
  590. X
  591. Xclean : 
  592. X    rm -f *.o fig2dev fig2dev-* core
  593. X    (cd dev; make clean)
  594. END_OF_FILE
  595. if test 784 -ne `wc -c <'transfig/fig2dev/Makefile'`; then
  596.     echo shar: \"'transfig/fig2dev/Makefile'\" unpacked with wrong size!
  597. fi
  598. # end of 'transfig/fig2dev/Makefile'
  599. fi
  600. if test -f 'transfig/fig2dev/NOTES' -a "${1}" != "-c" ; then 
  601.   echo shar: Will not clobber existing file \"'transfig/fig2dev/NOTES'\"
  602. else
  603. echo shar: Extracting \"'transfig/fig2dev/NOTES'\" \(1019 characters\)
  604. sed "s/^X//" >'transfig/fig2dev/NOTES' <<'END_OF_FILE'
  605. XA brief history of Fig translation programs.
  606. X
  607. XFig2dev is derived from f2p, the original program written by the author of Fig,
  608. XSupoj Sutanthavibul of the University of Texas at Austin, to translate Fig
  609. Xcode to PIC.  The devlopment is somewhat complex.
  610. X
  611. XSupoj adapted f2p for PostScript ouput: f2ps.
  612. X
  613. XI adapted f2p for PiCTeX output: fig2tex.
  614. X
  615. XFrank Schmuck, then a graduate student at Cornell, adapted fig2tex for
  616. XLaTeX picture environment output: fig2latex.
  617. X
  618. XFrank also enhanced Fig, giving us Fig-FS.  I in turn extended the
  619. Xdefinition of Fig code and added corresponding features to Fig-FS.
  620. XI implemented this extension (TFX) in fig2tex, and in fig2ps, which
  621. Xis an adaption of f2ps.
  622. X
  623. XConrad Kwok, then of the University of California at Davis, adapted
  624. Xfig2tex for (E)EPIC output: fig2epic.
  625. X
  626. XHe also enhanced f2p to support the TFX extension: fig2pic.
  627. X
  628. XI have now reorganized the five programs named fig2* into drivers for
  629. Xa single tranlation program: fig2dev.
  630. X
  631. XMicah Beck
  632. XCornell Dept. of Computer Science
  633. X6 May 1989
  634. END_OF_FILE
  635. if test 1019 -ne `wc -c <'transfig/fig2dev/NOTES'`; then
  636.     echo shar: \"'transfig/fig2dev/NOTES'\" unpacked with wrong size!
  637. fi
  638. # end of 'transfig/fig2dev/NOTES'
  639. fi
  640. if test -f 'transfig/fig2dev/alloc.h' -a "${1}" != "-c" ; then 
  641.   echo shar: Will not clobber existing file \"'transfig/fig2dev/alloc.h'\"
  642. else
  643. echo shar: Extracting \"'transfig/fig2dev/alloc.h'\" \(640 characters\)
  644. sed "s/^X//" >'transfig/fig2dev/alloc.h' <<'END_OF_FILE'
  645. Xextern char    *malloc();
  646. Xextern char    *calloc();
  647. X
  648. X#define        Line_malloc(z)        z = (F_line*)malloc(LINOBJ_SIZE)
  649. X#define        Spline_malloc(z)    z = (F_spline*)malloc(SPLOBJ_SIZE)
  650. X#define        Ellipse_malloc(z)    z = (F_ellipse*)malloc(ELLOBJ_SIZE)
  651. X#define        Arc_malloc(z)        z = (F_arc*)malloc(ARCOBJ_SIZE)
  652. X#define        Compound_malloc(z)    z = (F_compound*)malloc(COMOBJ_SIZE)
  653. X#define        Text_malloc(z)        z = (F_text*)malloc(TEXOBJ_SIZE)
  654. X#define        Point_malloc(z)        z = (F_point*)malloc(POINT_SIZE)
  655. X#define        Control_malloc(z)    z = (F_control*)malloc(CONTROL_SIZE)
  656. X#define        Arrow_malloc(z)        z = (F_arrow*)malloc(ARROW_SIZE)
  657. X
  658. Xextern char    Err_mem[];
  659. Xextern char    Err_incomp[];
  660. END_OF_FILE
  661. if test 640 -ne `wc -c <'transfig/fig2dev/alloc.h'`; then
  662.     echo shar: \"'transfig/fig2dev/alloc.h'\" unpacked with wrong size!
  663. fi
  664. # end of 'transfig/fig2dev/alloc.h'
  665. fi
  666. if test -f 'transfig/fig2dev/arrow.c' -a "${1}" != "-c" ; then 
  667.   echo shar: Will not clobber existing file \"'transfig/fig2dev/arrow.c'\"
  668. else
  669. echo shar: Extracting \"'transfig/fig2dev/arrow.c'\" \(1366 characters\)
  670. sed "s/^X//" >'transfig/fig2dev/arrow.c' <<'END_OF_FILE'
  671. X#include <stdio.h>
  672. X#include "alloc.h"
  673. X#include "object.h"
  674. X
  675. Xstatic double        forward_arrow_wid = 4;
  676. Xstatic double        forward_arrow_ht = 8;
  677. Xstatic int        forward_arrow_type = 0;
  678. Xstatic int        forward_arrow_style = 0;
  679. Xstatic double        forward_arrow_thickness = 1;
  680. X
  681. Xstatic double        backward_arrow_wid = 4;
  682. Xstatic double        backward_arrow_ht = 8;
  683. Xstatic int        backward_arrow_type = 0;
  684. Xstatic int        backward_arrow_style = 0;
  685. Xstatic double        backward_arrow_thickness = 1;
  686. X
  687. XF_arrow *
  688. Xforward_arrow()
  689. X{
  690. X    F_arrow        *a;
  691. X
  692. X    if (NULL == (Arrow_malloc(a))) {
  693. X        put_msg(Err_mem);
  694. X        return(NULL);
  695. X        }
  696. X    a->type = forward_arrow_type;
  697. X    a->style = forward_arrow_style;
  698. X    a->thickness = forward_arrow_thickness;
  699. X    a->wid = forward_arrow_wid;
  700. X    a->ht = forward_arrow_ht;
  701. X    return(a);
  702. X    }
  703. X
  704. XF_arrow *
  705. Xbackward_arrow()
  706. X{
  707. X    F_arrow        *a;
  708. X
  709. X    if (NULL == (Arrow_malloc(a))) {
  710. X        put_msg(Err_mem);
  711. X        return(NULL);
  712. X        }
  713. X    a->type = backward_arrow_type;
  714. X    a->style = backward_arrow_style;
  715. X    a->thickness = backward_arrow_thickness;
  716. X    a->wid = backward_arrow_wid;
  717. X    a->ht = backward_arrow_ht;
  718. X    return(a);
  719. X    }
  720. X
  721. XF_arrow *
  722. Xmake_arrow(type, style, thickness, wid, ht)
  723. Xint    type, style;
  724. Xdouble    thickness, wid, ht;
  725. X{
  726. X    F_arrow        *a;
  727. X
  728. X    if (NULL == (Arrow_malloc(a))) {
  729. X        put_msg(Err_mem);
  730. X        return(NULL);
  731. X        }
  732. X    a->type = type;
  733. X    a->style = style;
  734. X    a->thickness = thickness;
  735. X    a->wid = wid;
  736. X    a->ht = ht;
  737. X    return(a);
  738. X    }
  739. END_OF_FILE
  740. if test 1366 -ne `wc -c <'transfig/fig2dev/arrow.c'`; then
  741.     echo shar: \"'transfig/fig2dev/arrow.c'\" unpacked with wrong size!
  742. fi
  743. # end of 'transfig/fig2dev/arrow.c'
  744. fi
  745. if test ! -d 'transfig/fig2dev/dev' ; then
  746.     echo shar: Creating directory \"'transfig/fig2dev/dev'\"
  747.     mkdir 'transfig/fig2dev/dev'
  748. fi
  749. if test -f 'transfig/fig2dev/dev/Makefile' -a "${1}" != "-c" ; then 
  750.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/Makefile'\"
  751. else
  752. echo shar: Extracting \"'transfig/fig2dev/dev/Makefile'\" \(312 characters\)
  753. sed "s/^X//" >'transfig/fig2dev/dev/Makefile' <<'END_OF_FILE'
  754. X#
  755. X#    Fig2dev Driver Library Makefile
  756. X#
  757. X
  758. XINCLUDES = -I..
  759. X#CFLAGS = -g $(INCLUDES)
  760. XCFLAGS =  -O $(INCLUDES)
  761. X
  762. XOBJ =  genps.o genlatex.o genepic.o genpictex.o genpic.o genbox.o
  763. XLIB = lib$(TARGET_ARCH).a
  764. X
  765. X$(LIB) : $(OBJ)
  766. X    ar r $(LIB) $(OBJ)
  767. X    ranlib $(LIB)
  768. X
  769. X#########
  770. Xtidy: 
  771. X    rm -f *.o
  772. X
  773. Xclean :
  774. X    rm -f *.o core lib*.a
  775. X
  776. END_OF_FILE
  777. if test 312 -ne `wc -c <'transfig/fig2dev/dev/Makefile'`; then
  778.     echo shar: \"'transfig/fig2dev/dev/Makefile'\" unpacked with wrong size!
  779. fi
  780. # end of 'transfig/fig2dev/dev/Makefile'
  781. fi
  782. if test -f 'transfig/fig2dev/dev/genbox.c' -a "${1}" != "-c" ; then 
  783.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/genbox.c'\"
  784. else
  785. echo shar: Extracting \"'transfig/fig2dev/dev/genbox.c'\" \(800 characters\)
  786. sed "s/^X//" >'transfig/fig2dev/dev/genbox.c' <<'END_OF_FILE'
  787. X/* 
  788. X *    genbox : Empty box driver for fig2dev translator
  789. X *
  790. X*/
  791. X#include <stdio.h>
  792. X#include "object.h"
  793. X#include "fig2dev.h"
  794. X
  795. Xvoid genbox_option(opt, optarg)
  796. Xchar opt, *optarg;
  797. X{
  798. X      switch (opt) {
  799. X
  800. X    case 's':
  801. X    case 'f':
  802. X    case 'm':
  803. X    case 'L':
  804. X        break;
  805. X
  806. X     default:
  807. X        put_msg(Err_badarg, opt, "box");
  808. X        exit(1);
  809. X    }
  810. X}
  811. X
  812. Xvoid genbox_start(objects)
  813. XF_compound    *objects;
  814. X{
  815. X    double ppi;
  816. X
  817. X    if (0 == (ppi = (double)objects->nwcorner.x)) {
  818. X        fprintf(stderr, "Resolution is zero!! default to 80 ppi\n");
  819. X        ppi = 80.0;
  820. X        }
  821. X
  822. X    /* draw box */
  823. X        fprintf(tfp, "\\makebox[%.3fin]{\\rule{0in}{%.3fin}}\n",
  824. X        (urx-llx)*mag/ppi, (ury-lly)*mag/ppi);
  825. X    }
  826. X
  827. Xstruct driver dev_box = {
  828. X    genbox_option,
  829. X    genbox_start,
  830. X    gendev_null,
  831. X    gendev_null,
  832. X    gendev_null,
  833. X    gendev_null,
  834. X    gendev_null,
  835. X    gendev_null,
  836. X    INCLUDE_TEXT
  837. X};
  838. END_OF_FILE
  839. if test 800 -ne `wc -c <'transfig/fig2dev/dev/genbox.c'`; then
  840.     echo shar: \"'transfig/fig2dev/dev/genbox.c'\" unpacked with wrong size!
  841. fi
  842. # end of 'transfig/fig2dev/dev/genbox.c'
  843. fi
  844. if test -f 'transfig/fig2dev/dev/picfonts.h' -a "${1}" != "-c" ; then 
  845.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/picfonts.h'\"
  846. else
  847. echo shar: Extracting \"'transfig/fig2dev/dev/picfonts.h'\" \(458 characters\)
  848. sed "s/^X//" >'transfig/fig2dev/dev/picfonts.h' <<'END_OF_FILE'
  849. X/*  The selection of font names may be site dependent */
  850. X
  851. Xchar        *fontnames[] = {
  852. X            "R", "R",        /* default */
  853. X            "R",            /* roman */
  854. X            "B",            /* bold */
  855. X            "I",            /* italic */
  856. X            "H",            /* sans serif */
  857. X            "C"            /* typewriter */
  858. X        };
  859. X#define MAXFONT 5
  860. X#define MAXFONTSIZE 108
  861. X
  862. X#define PICFONT(F)    (fontnames[((F) <= MAXFONT) ? (F)+1 : MAXFONT])
  863. X#define PICFONTSIZE(S)  ((S) > 0 ? \
  864. X                ((S) <= MAXFONTSIZE ? \
  865. X                    (S) : \
  866. X                    MAXFONTSIZE) : \
  867. X                font_size)
  868. END_OF_FILE
  869. if test 458 -ne `wc -c <'transfig/fig2dev/dev/picfonts.h'`; then
  870.     echo shar: \"'transfig/fig2dev/dev/picfonts.h'\" unpacked with wrong size!
  871. fi
  872. # end of 'transfig/fig2dev/dev/picfonts.h'
  873. fi
  874. if test -f 'transfig/fig2dev/dev/texfonts.h' -a "${1}" != "-c" ; then 
  875.   echo shar: Will not clobber existing file \"'transfig/fig2dev/dev/texfonts.h'\"
  876. else
  877. echo shar: Extracting \"'transfig/fig2dev/dev/texfonts.h'\" \(815 characters\)
  878. sed "s/^X//" >'transfig/fig2dev/dev/texfonts.h' <<'END_OF_FILE'
  879. Xstatic char        *fontnames[] = {
  880. X            "rm", "rm",        /* default */
  881. X            "rm",            /* roman */
  882. X            "bf",            /* bold */
  883. X            "it",            /* italic */
  884. X            "sf",             /* sans serif */
  885. X            "tt"            /* typewriter */
  886. X        };
  887. X#define MAXFONT 5
  888. X
  889. X/* The selection of font names may be site dependent.
  890. X * Not all fonts are preloaded at all sizes.
  891. X */
  892. X
  893. Xstatic char        *fontsizes[] = {
  894. X            "elv", "elv",        /* default */
  895. X            "fiv", "fiv", "fiv", "fiv",     /* small fonts */
  896. X            "fiv",            /* five point font */
  897. X            "six", "sev", "egt",    /* etc */
  898. X            "nin", "ten", "elv",
  899. X            "twl", "twl", "frtn",    
  900. X            "frtn", "frtn", "svtn",
  901. X            "svtn", "svtn", "twty",
  902. X            "twty", "twty", "twty", "twty", "twfv"
  903. X            };
  904. X#define MAXFONTSIZE 25
  905. X
  906. X#define TEXFONT(F)    (fontnames[((F) <= MAXFONT) ? (F)+1 : MAXFONT])
  907. X#define TEXFONTSIZE(S)    (fontsizes[((S) <= MAXFONTSIZE) ? (S)+1 : MAXFONTSIZE])
  908. END_OF_FILE
  909. if test 815 -ne `wc -c <'transfig/fig2dev/dev/texfonts.h'`; then
  910.     echo shar: \"'transfig/fig2dev/dev/texfonts.h'\" unpacked with wrong size!
  911. fi
  912. # end of 'transfig/fig2dev/dev/texfonts.h'
  913. fi
  914. if test -f 'transfig/fig2dev/drivers.h' -a "${1}" != "-c" ; then 
  915.   echo shar: Will not clobber existing file \"'transfig/fig2dev/drivers.h'\"
  916. else
  917. echo shar: Extracting \"'transfig/fig2dev/drivers.h'\" \(549 characters\)
  918. sed "s/^X//" >'transfig/fig2dev/drivers.h' <<'END_OF_FILE'
  919. Xextern struct driver dev_box;
  920. Xextern struct driver dev_epic;
  921. Xextern struct driver dev_latex;
  922. Xextern struct driver dev_pic;
  923. Xextern struct driver dev_pictex;
  924. Xextern struct driver dev_ps;
  925. X
  926. Xstruct 
  927. X    {char *name; struct driver *dev;}
  928. X    drivers[]
  929. X    = {
  930. X        {"box",        &dev_box}, 
  931. X#ifdef EPIC
  932. X        {"epic",    &dev_epic},
  933. X        {"eepic",    &dev_epic},
  934. X        {"eepicemu",    &dev_epic},
  935. X#endif
  936. X#ifdef LATEX
  937. X        {"latex",    &dev_latex},
  938. X#endif
  939. X#ifdef PIC
  940. X        {"pic",        &dev_pic},
  941. X#endif
  942. X#ifdef PICTEX
  943. X        {"pictex",    &dev_pictex},
  944. X#endif
  945. X#ifdef PS
  946. X        {"ps",        &dev_ps},
  947. X#endif
  948. X        {"",        NULL}
  949. X    };
  950. END_OF_FILE
  951. if test 549 -ne `wc -c <'transfig/fig2dev/drivers.h'`; then
  952.     echo shar: \"'transfig/fig2dev/drivers.h'\" unpacked with wrong size!
  953. fi
  954. # end of 'transfig/fig2dev/drivers.h'
  955. fi
  956. if test -f 'transfig/fig2dev/fig2dev.h' -a "${1}" != "-c" ; then 
  957.   echo shar: Will not clobber existing file \"'transfig/fig2dev/fig2dev.h'\"
  958. else
  959. echo shar: Extracting \"'transfig/fig2dev/fig2dev.h'\" \(727 characters\)
  960. sed "s/^X//" >'transfig/fig2dev/fig2dev.h' <<'END_OF_FILE'
  961. X/* 
  962. X * Device driver interface structure
  963. X */
  964. Xstruct driver {
  965. X     void (*option)();    /* interpret driver-specific options */
  966. X      void (*start)();    /* output file header */
  967. X    void (*arc)();        /* object generators */
  968. X    void (*ellipse)();
  969. X    void (*line)();
  970. X    void (*spline)();
  971. X    void (*text)();
  972. X    void (*end)();        /* output file trailer */
  973. X      int text_include;    /* include text length in bounding box */
  974. X#define INCLUDE_TEXT 1
  975. X#define EXCLUDE_TEXT 0
  976. X};
  977. X
  978. Xextern char *strchr();
  979. Xextern void fprintf(), fputc();
  980. X
  981. Xextern char Err_badarg[];
  982. Xextern char Err_incomp[];
  983. Xextern char Err_mem[];
  984. X
  985. Xextern char    *prog, *from;
  986. Xextern int    font_size;
  987. Xextern double    mag;
  988. Xextern FILE    *tfp;
  989. X
  990. Xextern int llx, lly, urx, ury, coord_system;
  991. X
  992. Xextern void gendev_null();
  993. END_OF_FILE
  994. if test 727 -ne `wc -c <'transfig/fig2dev/fig2dev.h'`; then
  995.     echo shar: \"'transfig/fig2dev/fig2dev.h'\" unpacked with wrong size!
  996. fi
  997. # end of 'transfig/fig2dev/fig2dev.h'
  998. fi
  999. if test -f 'transfig/fig2dev/fig2ps2tex' -a "${1}" != "-c" ; then 
  1000.   echo shar: Will not clobber existing file \"'transfig/fig2dev/fig2ps2tex'\"
  1001. else
  1002. echo shar: Extracting \"'transfig/fig2dev/fig2ps2tex'\" \(456 characters\)
  1003. sed "s/^X//" >'transfig/fig2dev/fig2ps2tex' <<'END_OF_FILE'
  1004. X#! /bin/csh -f
  1005. X#
  1006. X# Fig2ps2tex - generate a TeX file for including a PostScript file
  1007. X#         involves calculating the bounding box from fig2ps output
  1008. X#
  1009. Xset bbox = `grep "^%%BoundingBox:" $1`
  1010. X
  1011. Xset xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
  1012. Xset ysp = `echo "3k $bbox[5] $bbox[3] - 72 / p" | dc`
  1013. X
  1014. Xecho "\makebox[${xsp}in][l]{"
  1015. Xecho "  \vbox to ${ysp}in{"
  1016. Xecho "    \vfill"
  1017. Xecho "    \special{psfile=$1}"
  1018. Xecho "  }"
  1019. Xecho "  \vspace{-\baselineskip}"
  1020. Xecho "}"
  1021. END_OF_FILE
  1022. if test 456 -ne `wc -c <'transfig/fig2dev/fig2ps2tex'`; then
  1023.     echo shar: \"'transfig/fig2dev/fig2ps2tex'\" unpacked with wrong size!
  1024. fi
  1025. chmod +x 'transfig/fig2dev/fig2ps2tex'
  1026. # end of 'transfig/fig2dev/fig2ps2tex'
  1027. fi
  1028. if test -f 'transfig/fig2dev/free.c' -a "${1}" != "-c" ; then 
  1029.   echo shar: Will not clobber existing file \"'transfig/fig2dev/free.c'\"
  1030. else
  1031. echo shar: Extracting \"'transfig/fig2dev/free.c'\" \(2189 characters\)
  1032. sed "s/^X//" >'transfig/fig2dev/free.c' <<'END_OF_FILE'
  1033. X#include <stdio.h>
  1034. X#include <math.h>
  1035. X#include "object.h"
  1036. X
  1037. Xfree_arc(list)
  1038. XF_arc    **list;
  1039. X{
  1040. X    F_arc    *a, *arc;
  1041. X
  1042. X    for (a = *list; a != NULL;) {
  1043. X        arc = a;
  1044. X        a = a->next;
  1045. X        if (arc->for_arrow) free((char*)arc->for_arrow);
  1046. X        if (arc->back_arrow) free((char*)arc->back_arrow);
  1047. X        free((char*)arc);
  1048. X        } 
  1049. X    *list = NULL;
  1050. X    }
  1051. X
  1052. Xfree_compound(list)
  1053. XF_compound    **list;
  1054. X{
  1055. X    F_compound    *c, *compound;
  1056. X
  1057. X    for (c = *list; c != NULL;) {
  1058. X        compound = c;
  1059. X        c = c->next;
  1060. X        free_arc(&compound->arcs);
  1061. X        free_compound(&compound->compounds);
  1062. X        free_ellipse(&compound->ellipses);
  1063. X        free_line(&compound->lines);
  1064. X        free_spline(&compound->splines);
  1065. X        free_text(&compound->texts);
  1066. X        free((char*)compound);
  1067. X        } 
  1068. X    *list = NULL;
  1069. X    }
  1070. X
  1071. Xfree_ellipse(list)
  1072. XF_ellipse    **list;
  1073. X{
  1074. X    F_ellipse    *e, *ellipse;
  1075. X
  1076. X    for (e = *list; e != NULL;) {
  1077. X        ellipse = e;
  1078. X        e = e->next;
  1079. X        free((char*)ellipse);
  1080. X        } 
  1081. X    *list = NULL;
  1082. X    }
  1083. X
  1084. Xfree_line(list)
  1085. XF_line    **list;
  1086. X{
  1087. X    F_line    *l, *line;
  1088. X
  1089. X    for (l = *list; l != NULL;) {
  1090. X        line = l;
  1091. X        l = l->next;
  1092. X        free_linestorage(line);
  1093. X        } 
  1094. X    *list = NULL;
  1095. X    }
  1096. X
  1097. Xfree_text(list)
  1098. XF_text    **list;
  1099. X{
  1100. X    F_text    *t, *text;
  1101. X
  1102. X    for (t = *list; t != NULL;) {
  1103. X        text = t;
  1104. X        t = t->next;
  1105. X        cfree(text->cstring);
  1106. X        free((char*)text);
  1107. X        } 
  1108. X    *list = NULL;
  1109. X    }
  1110. X
  1111. Xfree_spline(list)
  1112. XF_spline    **list;
  1113. X{
  1114. X    F_spline    *s, *spline;
  1115. X
  1116. X    for (s = *list; s != NULL;) {
  1117. X        spline = s;
  1118. X        s = s->next;
  1119. X        free_splinestorage(spline);
  1120. X        }
  1121. X    *list = NULL;
  1122. X    }
  1123. X
  1124. Xfree_splinestorage(s)
  1125. XF_spline      *s;
  1126. X{
  1127. X        F_point        *p, *q;
  1128. X        F_control    *a, *b;
  1129. X
  1130. X        for (p = s->points; p != NULL; p = q) {
  1131. X            q = p->next;
  1132. X            free((char*)p);
  1133. X            }
  1134. X        for (a = s->controls; a != NULL; a = b) {
  1135. X            b = a->next;
  1136. X            free((char*)a);
  1137. X            }
  1138. X    if (s->for_arrow) free((char*)s->for_arrow);
  1139. X    if (s->back_arrow) free((char*)s->back_arrow);
  1140. X        free((char*)s);
  1141. X        }
  1142. X
  1143. Xfree_linestorage(l)
  1144. XF_line    *l;
  1145. X{
  1146. X    F_point    *p, *q;
  1147. X
  1148. X    for (p = l->points; p != NULL; p = q) {
  1149. X        q = p->next;
  1150. X        free((char*)p);
  1151. X        }
  1152. X    if (l->for_arrow) free((char*)l->for_arrow);
  1153. X    if (l->back_arrow) free((char*)l->back_arrow);
  1154. X    free((char*)l);
  1155. X    }
  1156. END_OF_FILE
  1157. if test 2189 -ne `wc -c <'transfig/fig2dev/free.c'`; then
  1158.     echo shar: \"'transfig/fig2dev/free.c'\" unpacked with wrong size!
  1159. fi
  1160. # end of 'transfig/fig2dev/free.c'
  1161. fi
  1162. if test -f 'transfig/fig2dev/getopt.c' -a "${1}" != "-c" ; then 
  1163.   echo shar: Will not clobber existing file \"'transfig/fig2dev/getopt.c'\"
  1164. else
  1165. echo shar: Extracting \"'transfig/fig2dev/getopt.c'\" \(2996 characters\)
  1166. sed "s/^X//" >'transfig/fig2dev/getopt.c' <<'END_OF_FILE'
  1167. X/*
  1168. X    I got this off net.sources from Henry Spencer.
  1169. X    It is a public domain getopt(3) like in System V.
  1170. X    I have made the following modifications:
  1171. X
  1172. X    index(s,c) was added because too many people could
  1173. X    not compile getopt without it.
  1174. X
  1175. X    A test main program was added, ifdeffed by GETOPT.
  1176. X    This main program is a public domain implementation
  1177. X    of the getopt(1) program like in System V.  The getopt
  1178. X    program can be used to standardize shell option handling.
  1179. X        e.g.  cc -DGETOPT getopt.c -o getopt
  1180. X*/
  1181. X#include <stdio.h>
  1182. X
  1183. X#ifndef lint
  1184. Xstatic    char    sccsfid[] = "@(#) getopt.c 5.0 (UTZoo) 1985";
  1185. X#endif
  1186. X
  1187. X#define    ARGCH    (int)':'
  1188. X#define BADCH     (int)'?'
  1189. X#define EMSG     ""
  1190. X#define    ENDARGS  "--"
  1191. X
  1192. X/* this is included because index is not on some UNIX systems */
  1193. Xstatic
  1194. Xchar *
  1195. Xindex (s, c)
  1196. Xregister    char    *s;
  1197. Xregister    int     c;
  1198. X    {
  1199. X    while (*s)
  1200. X        if (c == *s) return (s);
  1201. X        else s++;
  1202. X    return (NULL);
  1203. X    }
  1204. X
  1205. X/*
  1206. X * get option letter from argument vector
  1207. X */
  1208. Xint    opterr = 1,        /* useless, never set or used */
  1209. X    optind = 1,        /* index into parent argv vector */
  1210. X    optopt;            /* character checked for validity */
  1211. Xchar    *optarg;        /* argument associated with option */
  1212. X
  1213. X#define tell(s)    fputs(*nargv,stderr);fputs(s,stderr); \
  1214. X        fputc(optopt,stderr);fputc('\n',stderr);return(BADCH);
  1215. X
  1216. X
  1217. Xgetopt(nargc,nargv,ostr)
  1218. Xint    nargc;
  1219. Xchar    **nargv,
  1220. X    *ostr;
  1221. X{
  1222. X    static char    *place = EMSG;    /* option letter processing */
  1223. X    register char    *oli;        /* option letter list index */
  1224. X    char    *index();
  1225. X
  1226. X    if(!*place) {            /* update scanning pointer */
  1227. X        if(optind >= nargc || *(place = nargv[optind]) != '-' || !*++place) return(EOF);
  1228. X        if (*place == '-') {    /* found "--" */
  1229. X            ++optind;
  1230. X            return(EOF);
  1231. X        }
  1232. X    }                /* option letter okay? */
  1233. X    if ((optopt = (int)*place++) == ARGCH || !(oli = index(ostr,optopt))) {
  1234. X        if(!*place) ++optind;
  1235. X        tell(": illegal option -- ");
  1236. X    }
  1237. X    if (*++oli != ARGCH) {        /* don't need argument */
  1238. X        optarg = NULL;
  1239. X        if (!*place) ++optind;
  1240. X    }
  1241. X    else {                /* need an argument */
  1242. X        if (*place) optarg = place;    /* no white space */
  1243. X        else if (nargc <= ++optind) {    /* no arg */
  1244. X            place = EMSG;
  1245. X            tell(": option requires an argument -- ");
  1246. X        }
  1247. X         else optarg = nargv[optind];    /* white space */
  1248. X        place = EMSG;
  1249. X        ++optind;
  1250. X    }
  1251. X    return(optopt);            /* dump back option letter */
  1252. X}
  1253. X
  1254. X
  1255. X#ifdef GETOPT
  1256. X
  1257. X#ifndef lint
  1258. Xstatic    char    sccspid[] = "@(#) getopt.c 5.1 (WangInst) 6/15/85";
  1259. X#endif
  1260. X
  1261. Xmain (argc, argv) char **argv;
  1262. X    {
  1263. X    char    *optstring = argv[1];
  1264. X    char    *argv0 = argv[0];
  1265. X    extern    int     optind;
  1266. X    extern    char    *optarg;
  1267. X    int     opterr = 0;
  1268. X    int     C;
  1269. X    char    *opi;
  1270. X    if (argc == 1)
  1271. X        {
  1272. X        fprintf (stderr, "Usage: %s optstring args\n", argv0);
  1273. X        exit (1);
  1274. X        }
  1275. X    argv++;
  1276. X    argc--;
  1277. X    argv[0] = argv0;
  1278. X    while ((C = getopt (argc, argv, optstring)) != EOF)
  1279. X        {
  1280. X        if (C == BADCH) opterr++;
  1281. X        printf ("-%c ", C);
  1282. X        opi = index (optstring, C);
  1283. X        if (opi && opi[1] == ARGCH)
  1284. X            if (optarg)
  1285. X                printf ("\"%s\" ", optarg);
  1286. X            else opterr++;
  1287. X        }
  1288. X    printf ("%s", ENDARGS);
  1289. X    while (optind < argc)
  1290. X        printf (" \"%s\"", argv[optind++]);
  1291. X    putchar ('\n');
  1292. X    exit (opterr);
  1293. X    }
  1294. X
  1295. X#endif
  1296. END_OF_FILE
  1297. if test 2996 -ne `wc -c <'transfig/fig2dev/getopt.c'`; then
  1298.     echo shar: \"'transfig/fig2dev/getopt.c'\" unpacked with wrong size!
  1299. fi
  1300. # end of 'transfig/fig2dev/getopt.c'
  1301. fi
  1302. if test -f 'transfig/fig2dev/newfont.h' -a "${1}" != "-c" ; then 
  1303.   echo shar: Will not clobber existing file \"'transfig/fig2dev/newfont.h'\"
  1304. else
  1305. echo shar: Extracting \"'transfig/fig2dev/newfont.h'\" \(2809 characters\)
  1306. sed "s/^X//" >'transfig/fig2dev/newfont.h' <<'END_OF_FILE'
  1307. XReceived: from cu-arpa.cs.cornell.edu by loki.cs.cornell.edu (4.0/I-1.91f)
  1308. X    id AA13388; Fri, 21 Jul 89 12:48:10 EDT
  1309. XReceived: from thumper.bellcore.com by cu-arpa.cs.cornell.edu (5.61+2/1.91d)
  1310. X    id AA02218; Fri, 21 Jul 89 12:48:00 -0400
  1311. XReceived: by thumper.bellcore.com (5.54/4.7)
  1312. X    id AA07930; Fri, 21 Jul 89 12:47:12 EDT
  1313. XReceived: by dino.bellcore.com (4.12/4.7)
  1314. X    id AA10363; Fri, 21 Jul 89 12:49:10 edt
  1315. XDate: Fri, 21 Jul 89 12:49:10 edt
  1316. XFrom: dana@thumper.bellcore.com (Dana A. Chee)
  1317. XMessage-Id: <8907211649.AA10363@dino.bellcore.com>
  1318. XTo: beck@cs.cornell.edu (Micah Beck)
  1319. XIn-Reply-To: <8907191419.AA10822@utgard.cs.cornell.edu>
  1320. XSubject: Hello, Dana?
  1321. XStatus: R
  1322. X
  1323. XBelieve it or not, I haven't dropped off the face of the earth.  Yes
  1324. XI'm still working on it when time permits, and below is my font
  1325. Xscheme (with all ifdefs removed).  As you see, there are three
  1326. Xcomponents to a font, the face (font), style, and size.  Hope this
  1327. Xhelps you out (and hopefully an alpha of this will be out soon).
  1328. X
  1329. XDana
  1330. X
  1331. X
  1332. Xtypedef         struct f_text {
  1333. X                        int                     type;
  1334. X#define                                 T_LEFT_JUSTIFIED        0
  1335. X#define                                 T_CENTER_JUSTIFIED      1
  1336. X#define                                 T_RIGHT_JUSTIFIED       2
  1337. X                        int                     font;
  1338. X#define                                 TIMES                   0
  1339. X#define                                 HELVETICA               4
  1340. X#define                                 COURIER                 8
  1341. X#define                                 NCENBOOK                12
  1342. X                        int                     size;   /* point size */
  1343. X                        int                     color;
  1344. X                        int                     depth;
  1345. X                        double                  angle;  /* in radian */
  1346. X                        int                     style;
  1347. X#define                                 ROMAN           0
  1348. X#define                                 ITALIC          1
  1349. X#define                                 OBLIQUE         1
  1350. X#define                                 BOLD            2
  1351. X#define                                 BOLD_ITALIC     3
  1352. X#define                                 BOLD_OBLIQUE    3
  1353. X                        int                     height; /* pixels */
  1354. X                        int                     length; /* pixels */
  1355. X                        int                     base_x;
  1356. X                        int                     base_y;
  1357. X                        struct f_pen            *pen;
  1358. X                        char                    *cstring;
  1359. X#ifdef  X11
  1360. X                        GC                      gc;
  1361. X#endif  /* X11 */
  1362. X                        struct f_text           *next;
  1363. X                        }
  1364. X                F_text;
  1365. END_OF_FILE
  1366. if test 2809 -ne `wc -c <'transfig/fig2dev/newfont.h'`; then
  1367.     echo shar: \"'transfig/fig2dev/newfont.h'\" unpacked with wrong size!
  1368. fi
  1369. # end of 'transfig/fig2dev/newfont.h'
  1370. fi
  1371. if test -f 'transfig/fig2dev/pi.h' -a "${1}" != "-c" ; then 
  1372.   echo shar: Will not clobber existing file \"'transfig/fig2dev/pi.h'\"
  1373. else
  1374. echo shar: Extracting \"'transfig/fig2dev/pi.h'\" \(94 characters\)
  1375. sed "s/^X//" >'transfig/fig2dev/pi.h' <<'END_OF_FILE'
  1376. X#ifndef M_PI
  1377. X#define M_PI    3.14159265358979323846
  1378. X#define M_PI_2    1.57079632679489661923
  1379. X#endif
  1380. END_OF_FILE
  1381. if test 94 -ne `wc -c <'transfig/fig2dev/pi.h'`; then
  1382.     echo shar: \"'transfig/fig2dev/pi.h'\" unpacked with wrong size!
  1383. fi
  1384. # end of 'transfig/fig2dev/pi.h'
  1385. fi
  1386. if test -f 'transfig/fig2dev/pic2tpic' -a "${1}" != "-c" ; then 
  1387.   echo shar: Will not clobber existing file \"'transfig/fig2dev/pic2tpic'\"
  1388. else
  1389. echo shar: Extracting \"'transfig/fig2dev/pic2tpic'\" \(1034 characters\)
  1390. sed "s/^X//" >'transfig/fig2dev/pic2tpic' <<'END_OF_FILE'
  1391. X#!/bin/sh
  1392. Xsed -e '
  1393. X    s/\(\\f[^(]\)\(\\s[0-9]*\)/\2\1/g
  1394. X    s/\(\\f(..\)\(\\s[0-9]*\)/\2\1/g
  1395. X    s/"\([^"]*\)\\fP\([^"]*\)"/"\1\2"/g
  1396. X    s/"\([^"]*\)\\fR\([^"]*\)"/"\1\\rm \2"/g
  1397. X    s/"\([^"]*\)\\fI\([^"]*\)"/"\1\\it \2"/g
  1398. X    s/"\([^"]*\)\\fB\([^"]*\)"/"\1\\bf \2"/g
  1399. X    s/"\([^"]*\)\\fH\([^"]*\)"/"\1\\ss \2"/g
  1400. X    s/"\([^"]*\)\\fC\([^"]*\)"/"\1\\tt \2"/g
  1401. X    s/"\([^"]*\)\\f(CO\([^"]*\)"/"\1\\tt \2"/g
  1402. X    s/"\([^"]*\)\\f(CW\([^"]*\)"/"\1\\tt \2"/g
  1403. X    s/"\([^"]*\)\\s0\([^"]*\)"/"\1\2"/g
  1404. X    s/"\([^"]*\)\\s[56]\([^0-9][^"]*\)"/"\1\\tiny \2"/g
  1405. X    s/"\([^"]*\)\\s7\([^0-9][^"]*\)"/"\1\\scriptsize \2"/g
  1406. X    s/"\([^"]*\)\\s8\([^0-9][^"]*\)"/"\1\\footnotesize \2"/g
  1407. X    s/"\([^"]*\)\\s9\([^0-9][^"]*\)"/"\1\\small \2"/g
  1408. X    s/"\([^"]*\)\\s1[01]\([^"]*\)"/"\1\\normalsize \2"/g
  1409. X    s/"\([^"]*\)\\s1[23]\([^"]*\)"/"\1\\large \2"/g
  1410. X    s/"\([^"]*\)\\s1[4-6]\([^"]*\)"/"\1\\Large \2"/g
  1411. X    s/"\([^"]*\)\\s1[7-9]\([^"]*\)"/"\1\\LARGE \2"/g
  1412. X    s/"\([^"]*\)\\s2[0-3]\([^"]*\)"/"\1\\huge \2"/g
  1413. X    s/"\([^"]*\)\\s2[4-9]\([^"]*\)"/"\1\\Huge \2"/g
  1414. X    s/"\([^"]*\)\\s3[0-9]\([^"]*\)"/"\1\\Huge \2"/g
  1415. X    ' $*
  1416. END_OF_FILE
  1417. if test 1034 -ne `wc -c <'transfig/fig2dev/pic2tpic'`; then
  1418.     echo shar: \"'transfig/fig2dev/pic2tpic'\" unpacked with wrong size!
  1419. fi
  1420. # end of 'transfig/fig2dev/pic2tpic'
  1421. fi
  1422. if test -f 'transfig/patchlevel.h' -a "${1}" != "-c" ; then 
  1423.   echo shar: Will not clobber existing file \"'transfig/patchlevel.h'\"
  1424. else
  1425. echo shar: Extracting \"'transfig/patchlevel.h'\" \(21 characters\)
  1426. sed "s/^X//" >'transfig/patchlevel.h' <<'END_OF_FILE'
  1427. X#define PATCHLEVEL 1
  1428. END_OF_FILE
  1429. if test 21 -ne `wc -c <'transfig/patchlevel.h'`; then
  1430.     echo shar: \"'transfig/patchlevel.h'\" unpacked with wrong size!
  1431. fi
  1432. # end of 'transfig/patchlevel.h'
  1433. fi
  1434. if test ! -d 'transfig/transfig' ; then
  1435.     echo shar: Creating directory \"'transfig/transfig'\"
  1436.     mkdir 'transfig/transfig'
  1437. fi
  1438. if test -f 'transfig/transfig/Makefile' -a "${1}" != "-c" ; then 
  1439.   echo shar: Will not clobber existing file \"'transfig/transfig/Makefile'\"
  1440. else
  1441. echo shar: Extracting \"'transfig/transfig/Makefile'\" \(358 characters\)
  1442. sed "s/^X//" >'transfig/transfig/Makefile' <<'END_OF_FILE'
  1443. X#    TransFig : Fig code translation Makefile creation program
  1444. X#
  1445. X#    Micah Beck
  1446. X#
  1447. X
  1448. XOBJ = transfig.o txfile.o mkfile.o sys.o ../fig2dev/getopt.c
  1449. X
  1450. X#CFLAGS =  -g
  1451. XCFLAGS = -O
  1452. X
  1453. XTARGET = transfig$(TARGET_ARCH)
  1454. X
  1455. X$(TARGET): $(OBJ)
  1456. X    $(CC) $(TARGET_ARCH) $(OBJ) -lm -o $(TARGET)
  1457. X
  1458. X$(OBJ): transfig.h
  1459. X
  1460. X#########
  1461. Xtidy: 
  1462. X    rm -f *.o
  1463. X
  1464. Xclean: 
  1465. X    rm -f *.o transfig transfig-* core
  1466. END_OF_FILE
  1467. if test 358 -ne `wc -c <'transfig/transfig/Makefile'`; then
  1468.     echo shar: \"'transfig/transfig/Makefile'\" unpacked with wrong size!
  1469. fi
  1470. # end of 'transfig/transfig/Makefile'
  1471. fi
  1472. if test -f 'transfig/transfig/mkfile.c' -a "${1}" != "-c" ; then 
  1473.   echo shar: Will not clobber existing file \"'transfig/transfig/mkfile.c'\"
  1474. else
  1475. echo shar: Extracting \"'transfig/transfig/mkfile.c'\" \(3510 characters\)
  1476. sed "s/^X//" >'transfig/transfig/mkfile.c' <<'END_OF_FILE'
  1477. X#include <stdio.h>
  1478. X#include "transfig.h"
  1479. X
  1480. X/*
  1481. X * create an appropriate makefile
  1482. X */
  1483. Xmakefile(mk, arg_list)
  1484. XFILE *mk;
  1485. Xargument *arg_list;
  1486. X{
  1487. X  argument *a;
  1488. X  char *i;
  1489. X  enum language to;
  1490. X  int needps, needpic, needfig;
  1491. X  
  1492. X
  1493. X  fprintf(mk, "#\n# TransFig makefile\n#\n");
  1494. X
  1495. X  fprintf(mk, "\nall: ");
  1496. X  for (a = arglist; a; a = a->next)
  1497. X        fprintf(mk, "%s.tex ", a->name);
  1498. X  fprintf(mk, "\n");
  1499. X
  1500. X  for (a = arglist; a; a = a->next)
  1501. X  {
  1502. X    i = a->name;
  1503. X    to = a->tolang;
  1504. X
  1505. X    needps = needpic = needfig = 0;
  1506. X
  1507. X    fprintf(mk, "\n# translation into %s\n\n", lname[(int)to]);
  1508. X
  1509. X    switch (to)
  1510. X    {
  1511. X    case pictex:
  1512. X        putfig(mk, pictex, a->f, a->s, a->m, i, "tex");
  1513. X        needfig = 1;
  1514. X        break;
  1515. X
  1516. X    case postscript:
  1517. X                puttarget(mk, i, "tex", "ps");
  1518. X                fprintf(mk, "\tfig2ps2tex %s.ps >%s.tex\n", i, i);
  1519. X        needps = 1;
  1520. X                break;
  1521. X
  1522. X        case psfig:
  1523. X                puttarget(mk, i, "tex", "ps");
  1524. X                fprintf(mk,"\techo \'\\strut\\psfig\{figure=%s.ps\}\' >%s.tex\n",
  1525. X                          i, i);
  1526. X        needps = 1;
  1527. X                break;
  1528. X
  1529. X    case latex:
  1530. X        putfig(mk, latex, a->f, a->s, a->m, i, "tex");
  1531. X        needfig = 1;
  1532. X        break;
  1533. X
  1534. X    case eepicemu:
  1535. X    case epic:
  1536. X    case eepic:
  1537. X        putfig(mk, to, a->f, a->s, a->m, i, "tex");
  1538. X        needfig = 1;
  1539. X        break;
  1540. X
  1541. X    case tpic:
  1542. X        puttarget(mk, i, "tex", "pic");
  1543. X        /* fprintf(mk, "\ttpic %s.pic\n", i); */
  1544. X        fprintf(mk, "\tpic2tpic %s.pic | tpic > %s.tex\n", i, i);
  1545. X        fprintf(mk, "\techo \'\\strut\\box\\graph\' >>%s.tex\n", i);
  1546. X        needpic = 1;
  1547. X        break;
  1548. X
  1549. X    case box:
  1550. X        putfig(mk, box, NULL, NULL, a->m, i, "tex");
  1551. X        needfig = 1;
  1552. X        break;
  1553. X
  1554. X    }
  1555. X
  1556. X    putclean(mk, i, "tex" );
  1557. X
  1558. X    /* conversion to postscript */
  1559. X    if (needps && a->type != ps) {
  1560. X        if ( a->tops ) {
  1561. X            puttarget(mk, i, "ps", iname[(int)a->type]);
  1562. X            fprintf(mk, "\t%s %s.%s > %s.ps\n", a->tops, i, iname[(int)a->type], i);
  1563. X        }
  1564. X        else {
  1565. X                    putfig(mk, postscript, a->f, a->s, a->m, i, "ps");
  1566. X                    a->interm = mksuff(i, ".ps");
  1567. X            needfig = 1;
  1568. X        }
  1569. X        putclean(mk, i, "ps" );
  1570. X    }
  1571. X
  1572. X    /* conversion to pic */
  1573. X    if (needpic && a->type != pic) {
  1574. X        if ( a->topic ) {
  1575. X            puttarget(mk, i, "pic", iname[(int)a->type]);
  1576. X            fprintf(mk, "\t%s %s.%s > %s.pic\n", a->topic, i, iname[(int)a->type],i);
  1577. X        }
  1578. X        else {
  1579. X            putfig(mk, tpic, a->f, a->s, a->m, i, "pic");
  1580. X
  1581. X            needfig = 1;
  1582. X        }
  1583. X        putclean(mk, i, "pic" );
  1584. X    }
  1585. X
  1586. X    /* conversion to fig */
  1587. X    if (needfig && a->type != fig) {
  1588. X        if ( a->tofig ) {
  1589. X            puttarget(mk, i, "fig", iname[(int)a->type]);
  1590. X            fprintf(mk, "\t%s %s.%s > %s.fig\n", a->tofig, i, iname[(int)a->type],i);
  1591. X            a->interm = mksuff(i, ".fig");
  1592. X        }
  1593. X        else {
  1594. X            fprintf(stderr, "transfig: warning: don't now how to make %s\n", mksuff(i, ".fig") );
  1595. X        }
  1596. X        putclean(mk, i, "fig" );
  1597. X    }
  1598. X  }
  1599. X}
  1600. X
  1601. Xputtarget(mk, i, suf1, suf2)
  1602. XFILE *mk;
  1603. Xchar *i, *suf1, *suf2;
  1604. X{
  1605. X    fprintf(mk, "%s.%s: %s.%s %s\n", i, suf1, i, suf2, mkfile);
  1606. X}
  1607. X
  1608. Xputfig(mk, to, f, s, m, i, suf)
  1609. XFILE *mk;
  1610. Xenum language to;
  1611. Xchar *f, *s, *m, *i, *suf;
  1612. X{
  1613. X  fprintf(mk, "%s%s%s: %s.fig %s\n",
  1614. X           i, (suf ? "." : ""), (suf ? suf : ""), i, mkfile);
  1615. X
  1616. X  if ( to == tpic )
  1617. X      fprintf(mk, "\tfig2dev -L pic ");
  1618. X  else
  1619. X      fprintf(mk, "\tfig2dev -L %s ", lname[(int)to]);
  1620. X
  1621. X  if (f && *f) fprintf(mk, "-f %s ", f);
  1622. X  if (s && *s) fprintf(mk, "-s %s ", s);
  1623. X  if (m && *m) fprintf(mk, "-m %s ", m);
  1624. X
  1625. X  fprintf(mk, "%s.fig > %s%s%s\n", i, i, (suf ? "." : ""), (suf ? suf : ""));
  1626. X}
  1627. X
  1628. Xputclean(mk, i, suf)
  1629. XFILE *mk;
  1630. Xchar *i, *suf;
  1631. X{
  1632. X   fprintf(mk, "clean::\n");
  1633. X   fprintf(mk, "\trm -f %s.%s\n", i, suf);
  1634. X   fprintf(mk, "\n");
  1635. X}
  1636. END_OF_FILE
  1637. if test 3510 -ne `wc -c <'transfig/transfig/mkfile.c'`; then
  1638.     echo shar: \"'transfig/transfig/mkfile.c'\" unpacked with wrong size!
  1639. fi
  1640. # end of 'transfig/transfig/mkfile.c'
  1641. fi
  1642. if test -f 'transfig/transfig/sys.c' -a "${1}" != "-c" ; then 
  1643.   echo shar: Will not clobber existing file \"'transfig/transfig/sys.c'\"
  1644. else
  1645. echo shar: Extracting \"'transfig/transfig/sys.c'\" \(857 characters\)
  1646. sed "s/^X//" >'transfig/transfig/sys.c' <<'END_OF_FILE'
  1647. X#include <stdio.h>
  1648. X#include "transfig.h"
  1649. X
  1650. X#define MAXSYS 1000
  1651. Xstatic char sysbuf[MAXSYS];
  1652. X
  1653. Xchar *sysls()
  1654. X{
  1655. X  FILE *ls;
  1656. X  int i;
  1657. X  char c;
  1658. X
  1659. X  ls = popen("/bin/ls *.fig", "r");
  1660. X  i = 0;
  1661. X  c = fgetc(ls);
  1662. X  while (c != EOF & i < MAXSYS-1)
  1663. X  {
  1664. X    sysbuf[i] = c;
  1665. X    i += 1;
  1666. X    c = fgetc(ls);
  1667. X  }
  1668. X  sysbuf[i] = NULL;
  1669. X  return sysbuf;
  1670. X}
  1671. X
  1672. Xsysmv(f)
  1673. Xchar *f;
  1674. X{
  1675. X  sprintf(sysbuf, "%s~", f);
  1676. X  unlink(sysbuf);
  1677. X  if (!link(f, sysbuf)) unlink(f);
  1678. X}
  1679. X
  1680. Xchar *strip(str, suf)
  1681. Xchar *str, *suf;
  1682. X{
  1683. X  char *p1, *p2;
  1684. X
  1685. X  for (p1 = &str[strlen(str)-1], p2 = &suf[strlen(suf)-1];
  1686. X    (p1 >= str && p2 >= suf) && (*p1 == *p2);
  1687. X    --p1, --p2);
  1688. X
  1689. X  if (p2 < suf)
  1690. X  {
  1691. X    *(p1+1) = NULL;
  1692. X    return str;
  1693. X  } else
  1694. X    return NULL;
  1695. X}
  1696. X
  1697. Xchar *mksuff(name, suff)
  1698. Xchar *name, *suff;
  1699. X{
  1700. X  char *temp;
  1701. X
  1702. X  temp = (char *)malloc(strlen(name)+strlen(suff)+1);
  1703. X  strcpy(temp, name);
  1704. X  strcat(temp, suff);
  1705. X  return temp;
  1706. X}
  1707. END_OF_FILE
  1708. if test 857 -ne `wc -c <'transfig/transfig/sys.c'`; then
  1709.     echo shar: \"'transfig/transfig/sys.c'\" unpacked with wrong size!
  1710. fi
  1711. # end of 'transfig/transfig/sys.c'
  1712. fi
  1713. if test -f 'transfig/transfig/transfig.c' -a "${1}" != "-c" ; then 
  1714.   echo shar: Will not clobber existing file \"'transfig/transfig/transfig.c'\"
  1715. else
  1716. echo shar: Extracting \"'transfig/transfig/transfig.c'\" \(3354 characters\)
  1717. sed "s/^X//" >'transfig/transfig/transfig.c' <<'END_OF_FILE'
  1718. X/*
  1719. X * transfig:     figure translation setup program
  1720. X *        creates TeX macro file and makefile
  1721. X *
  1722. X * usage: transfig <option> ... [[<flag> ... ] [<figure>] ... ] ...
  1723. X *
  1724. X * where:    <option> = -L <language> | -M <makefile> | -T <texfile>
  1725. X *        <flag>     = -f <font> | -s <size> | -m <scale>
  1726. X */
  1727. X
  1728. X#include <stdio.h>
  1729. X#include <string.h>
  1730. X#include "transfig.h"
  1731. X
  1732. Xargument *parse_arg(), *arglist = NULL, *lastarg = NULL;
  1733. Xchar *strip();
  1734. X
  1735. Xchar *mkfile = "Makefile";
  1736. Xchar *txfile = "transfig.tex";
  1737. X
  1738. Xchar *lname[] = {
  1739. X    "box",
  1740. X    "pictex",
  1741. X    "latex",
  1742. X    "epic",
  1743. X    "eepic",
  1744. X    "eepicemu",
  1745. X    "ps",
  1746. X    "psfig",
  1747. X    "tpic"};
  1748. X
  1749. Xchar *iname[] = {
  1750. X    "fig",
  1751. X      "pic",
  1752. X    "x",
  1753. X    "ps"};
  1754. Xmain(argc, argv)
  1755. Xint argc;
  1756. Xchar *argv[];
  1757. X{
  1758. X  FILE *mk, *tx;
  1759. X  enum language tolang = epic;
  1760. X  argument *a;
  1761. X  char c, *cp, *arg_f = NULL, *arg_s = NULL, *arg_m = NULL, *argbuf;
  1762. X
  1763. X  for ( optind = 1; optind < argc; optind++ ) {
  1764. X    cp = argv[optind];
  1765. X    if (*cp == '-')
  1766. X    {
  1767. X      if (!cp[1])
  1768. X    {
  1769. X        fprintf(stderr, "transfig: bad option format '-'\n");
  1770. X        exit(1);
  1771. X    }
  1772. X    if (cp[2])
  1773. X    {
  1774. X        optarg = &cp[2];
  1775. X    } else
  1776. X    {
  1777. X        optind += 1;
  1778. X        if (optind == argc)
  1779. X        {
  1780. X            fprintf(stderr,
  1781. X                "transfig: no value for '%c' arg\n", cp[1]);
  1782. X            exit(1);
  1783. X        }
  1784. X        optarg = argv[optind];
  1785. X    }
  1786. X     switch (cp[1]) {
  1787. X      case 'L':
  1788. X        tolang = str2lang(optarg);
  1789. X        break;
  1790. X      case 'M':
  1791. X        mkfile = optarg;
  1792. X        break;
  1793. X      case 'T':
  1794. X        txfile = optarg;
  1795. X        break;
  1796. X    case 'f':
  1797. X        arg_f = optarg;
  1798. X        break;
  1799. X    case 's':
  1800. X        arg_s = optarg;    
  1801. X        break;
  1802. X    case 'm':
  1803. X        arg_m = optarg;    
  1804. X        break;
  1805. X
  1806. X      default:
  1807. X        fprintf(stderr, "transfig: illegal option -- '%c'\n", *cp);
  1808. X        exit(1);
  1809. X      }
  1810. X    } else
  1811. X    {
  1812. X    a = parse_arg(tolang, arg_f, arg_s, arg_m, argv[optind]);
  1813. X
  1814. X    if ( !lastarg )
  1815. X        arglist = a;
  1816. X    else
  1817. X        lastarg->next = a; 
  1818. X    lastarg = a;
  1819. X    }
  1820. X  }
  1821. X
  1822. X  /* no files specified -> all files */
  1823. X  if (!arglist)
  1824. X  {
  1825. X    argbuf = sysls();
  1826. X    while (cp = strchr(argbuf, '\n'))
  1827. X    {
  1828. X        *cp = '\0';
  1829. X        a = parse_arg(tolang, arg_f, arg_s, arg_m, argbuf);
  1830. X        if ( !lastarg )
  1831. X            arglist = a;
  1832. X        else
  1833. X            lastarg->next = a; 
  1834. X        lastarg = a;
  1835. X        argbuf = cp+1;
  1836. X    }
  1837. X  }
  1838. X
  1839. X  sysmv(mkfile);
  1840. X  tx = fopen(txfile, "w");
  1841. X  texfile(tx, arglist);
  1842. X
  1843. X  mk = fopen(mkfile, "w");
  1844. X  makefile(mk, arglist);
  1845. X}
  1846. X
  1847. Xenum language str2lang(s)
  1848. Xchar *s;
  1849. X{
  1850. X  int i;
  1851. X
  1852. X  /* aliases */
  1853. X  if (!strcmp(s, "pic")) return tpic;
  1854. X  if (!strcmp(s, "postscript")) return postscript;
  1855. X  if (!strcmp(s, "null")) return box;
  1856. X
  1857. X  /* real names*/
  1858. X  for (i = 0; i <= (int)MAXLANG; i++)
  1859. X    if (!strcmp(lname[i], s)) return (enum language)i;
  1860. X
  1861. X  /* other strings */
  1862. X  fprintf(stderr, "Unknown output language \"%s\"\n", s);
  1863. X  exit(1);
  1864. X}
  1865. X
  1866. Xargument *parse_arg(tolang, arg_f, arg_s, arg_m, arg)
  1867. Xenum language tolang;
  1868. Xchar *arg_f, *arg_s, *arg_m, *arg;
  1869. X{
  1870. X  argument *a;
  1871. X
  1872. X  a = (argument *)malloc(sizeof(argument));
  1873. X  a->f = arg_f;
  1874. X  a->s = arg_s;
  1875. X  a->m = arg_m;
  1876. X  a->next = NULL;
  1877. X  a->tofig = NULL;
  1878. X  a->topic = NULL;
  1879. X  a->tops = NULL;
  1880. X  a->tolang = tolang;
  1881. X  
  1882. X  /* PIC */
  1883. X  if (strip(arg, ".pic"))
  1884. X  {
  1885. X      a->name = mksuff(arg, "");
  1886. X      a->type = pic;
  1887. X    a->tofig = PIC2FIG;
  1888. X    return a;
  1889. X  }
  1890. X
  1891. X  /* Xpic format */
  1892. X  if (strip(arg, ".x"))
  1893. X  {
  1894. X      a->name = mksuff(arg, "");
  1895. X      a->type = xpic;
  1896. X    a->tofig = X2FIG;
  1897. X    a->topic = X2PIC;
  1898. X    a->tops = X2PS;
  1899. X     return a;
  1900. X  }
  1901. X
  1902. X  /* PS format */
  1903. X  if (strip(arg, ".ps"))
  1904. X  {
  1905. X      a->name = mksuff(arg, "");
  1906. X      a->type = ps;
  1907. X     return a;
  1908. X  }
  1909. X
  1910. X  /* Fig format */
  1911. X  strip(arg, ".fig");
  1912. X  a->name = mksuff(arg, "");
  1913. X  a->type = fig;
  1914. X  return a;
  1915. X}
  1916. END_OF_FILE
  1917. if test 3354 -ne `wc -c <'transfig/transfig/transfig.c'`; then
  1918.     echo shar: \"'transfig/transfig/transfig.c'\" unpacked with wrong size!
  1919. fi
  1920. # end of 'transfig/transfig/transfig.c'
  1921. fi
  1922. if test -f 'transfig/transfig/transfig.h' -a "${1}" != "-c" ; then 
  1923.   echo shar: Will not clobber existing file \"'transfig/transfig/transfig.h'\"
  1924. else
  1925. echo shar: Extracting \"'transfig/transfig/transfig.h'\" \(767 characters\)
  1926. sed "s/^X//" >'transfig/transfig/transfig.h' <<'END_OF_FILE'
  1927. X/*
  1928. X * converters program names
  1929. X */
  1930. X#define FIG2DEV    "fig2dev"
  1931. X#define PIC2FIG "pic2fig"
  1932. X#define X2FIG "x2fig"
  1933. X#define X2PIC "x2pic"
  1934. X#define X2PS "x2ps -x"
  1935. X
  1936. X/*
  1937. X * filename defaults
  1938. X */
  1939. X#define MK "Makefile"
  1940. X#define TX "transfig.tex"
  1941. X
  1942. Xenum language  {box, pictex, 
  1943. X    latex, epic, eepic, eepicemu,
  1944. X    postscript, psfig, tpic};
  1945. X#define MAXLANG tpic
  1946. X
  1947. Xenum input {fig, pic, xpic, ps};
  1948. X#define MAXINPUT xps
  1949. X
  1950. Xtypedef struct argument{
  1951. X    char *name, *interm, *f, *s, *m, *tofig, *topic, *tops;
  1952. X    enum language tolang;
  1953. X    enum input type;
  1954. X    struct argument *next;
  1955. X} argument ;
  1956. X
  1957. Xextern enum language str2lang();
  1958. Xextern char *lname[];
  1959. Xextern char *iname[];
  1960. X
  1961. Xextern char *sysls(), *mksuff();
  1962. Xextern argument *arglist;
  1963. Xextern char *txfile, *mkfile;
  1964. X
  1965. Xextern char *optarg;
  1966. Xextern int optind;
  1967. X
  1968. END_OF_FILE
  1969. if test 767 -ne `wc -c <'transfig/transfig/transfig.h'`; then
  1970.     echo shar: \"'transfig/transfig/transfig.h'\" unpacked with wrong size!
  1971. fi
  1972. # end of 'transfig/transfig/transfig.h'
  1973. fi
  1974. if test -f 'transfig/transfig/txfile.c' -a "${1}" != "-c" ; then 
  1975.   echo shar: Will not clobber existing file \"'transfig/transfig/txfile.c'\"
  1976. else
  1977. echo shar: Extracting \"'transfig/transfig/txfile.c'\" \(1497 characters\)
  1978. sed "s/^X//" >'transfig/transfig/txfile.c' <<'END_OF_FILE'
  1979. X#include <stdio.h>
  1980. X#include "transfig.h"
  1981. X
  1982. X/*
  1983. X * create appropriate .tex file
  1984. X */
  1985. Xtexfile(tx, arg_list)
  1986. XFILE *tx;
  1987. Xargument *arg_list;
  1988. X{
  1989. X  enum language to;
  1990. X  argument *a, *arg_l;
  1991. X
  1992. X  for (a = arglist; a; a = a->next) {
  1993. X     to = a->tolang;
  1994. X
  1995. X     /* see if we already have this language */
  1996. X     for (arg_l = arglist; arg_l != a; arg_l = arg_l->next)
  1997. X    if ( arg_l->tolang == to ) break;
  1998. X    
  1999. X     if ( arg_l == a )
  2000. X    switch (to)
  2001. X    {
  2002. X    case pictex:
  2003. X        fprintf(tx, "\\typeout{TransFig: figures in PiCTeX.}\n");
  2004. X        fprintf(tx, "\\input{prepictex}\n");
  2005. X        fprintf(tx, "\\input{pictex}\n");
  2006. X        fprintf(tx, "\\input{postpictex}\n");
  2007. X        break;
  2008. X
  2009. X    case postscript:
  2010. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n");
  2011. X        break;
  2012. X
  2013. X    case psfig:
  2014. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript w/psfig.}\n");
  2015. X        fprintf(tx, "\\input{psfig}\n");
  2016. X        break;
  2017. X
  2018. X    case latex:
  2019. X        fprintf(tx, "\\typeout{TransFig: figures in LaTeX.}\n");
  2020. X        break;
  2021. X
  2022. X    case eepicemu:
  2023. X        to = eepicemu;
  2024. X
  2025. X    case eepic:
  2026. X#ifdef eemulation
  2027. X        to = eepicemu;
  2028. X#endif
  2029. X
  2030. X    case epic:
  2031. X        fprintf(tx, "\\typeout{TransFig: figures in %s.}\n", lname[(int)to]);
  2032. X        if (to == eepicemu || to == eepic)
  2033. X            fprintf(tx, "\\input{epic.sty}");
  2034. X        fprintf(tx, "\\input{%s.sty}\n", lname[(int)to]);
  2035. X        break;
  2036. X
  2037. X    case tpic:
  2038. X        fprintf(tx, "\\typeout{TransFig: figures in tpic.}\n");
  2039. X        break;
  2040. X
  2041. X    case box:
  2042. X        fprintf(tx, "\\typeout{TransFig: null figures.}\n");
  2043. X        break;
  2044. X
  2045. X    default:
  2046. X        fprintf(tx, "Unknown graphics language %s\n", lname[(int)to]);
  2047. X        exit(1);
  2048. X        break;
  2049. X
  2050. X    }
  2051. X  }
  2052. X}
  2053. END_OF_FILE
  2054. if test 1497 -ne `wc -c <'transfig/transfig/txfile.c'`; then
  2055.     echo shar: \"'transfig/transfig/txfile.c'\" unpacked with wrong size!
  2056. fi
  2057. # end of 'transfig/transfig/txfile.c'
  2058. fi
  2059. echo shar: End of archive 1 \(of 6\).
  2060. cp /dev/null ark1isdone
  2061. MISSING=""
  2062. for I in 1 2 3 4 5 6 ; do
  2063.     if test ! -f ark${I}isdone ; then
  2064.     MISSING="${MISSING} ${I}"
  2065.     fi
  2066. done
  2067. if test "${MISSING}" = "" ; then
  2068.     echo You have unpacked all 6 archives.
  2069.     rm -f ark[1-9]isdone
  2070. else
  2071.     echo You still need to unpack the following archives:
  2072.     echo "        " ${MISSING}
  2073. fi
  2074. ##  End of shell archive.
  2075. exit 0
  2076. -- 
  2077. Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
  2078. Use a domain-based address or give alternate paths, or you may lose out.
  2079.